package com.xmall.controller.wx;

import com.xmall.bean.vo.BaseRespVo;
import com.xmall.bean.vo.mallindex.MallIndexVo;
import com.xmall.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Connor
 * @ClassName: HomeController
 * @PackageName: com.xmall.controller.wx
 * @date 2020/12/08
 * @Version 1.0
 */
@RestController
@RequestMapping("wx/home")
public class HomeController {

    @Autowired
    HomeService homeService;

    @GetMapping("index")
    public BaseRespVo queryIndexData() {
        MallIndexVo mallIndexVo = homeService.queryIndexData();
        return BaseRespVo.ok(mallIndexVo);
    }
}
